// StudentScore.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <iostream.h>


int main(int argc, char* argv[])
{
	int Score[75][5];

	int score85 = 0;
	int score70 = 0;
	int score60 = 0;
    
	// initialize the score
	for(int i=0; i< 75;i++)
	{
		for(int j=0;j<5;j++)
		{
			Score[i][j]=rand()%100;		
		}
	}


	for(i=0; i< 75;i++)
	{
		cout<<"Student "<<i;

		for(int j=0;j<5;j++)
		{
			cout<<" "<<Score[i][j];
		}

		cout<<endl;
	}


	//Find the best student

	for(i=0; i< 75;i++)
	{
		score85 = 0;
		score70 = 0;
		score60 = 0;

		for(int j=0;j<5;j++)
		{
			if(Score[i][j]>=85)
			{
				score85++;
			}
			else if(Score[i][j]>=70)
			{
				score70++;
			}
			else if(Score[i][j]<60)
			{
				score60++;
			}
		}

		if(score60 >0)
		{
			cout<<"Student "<<i<<"is bad!"<<endl;
		}

		if(score85>3 && score70 >0 && 5==(score85+score70))
		{
			cout<<"Student "<<i<<"is good!"<<endl;
		}
	}	

	return 0;
}

